package org.example.bean;

/**
 * Description: 保存每个方法的执行时间
 * Author: e
 * CreateDate: 2021-05-20
 */
public class MethodInvokeTime {

    /**开始时间*/
    private long startTime;
    /**结束时间*/
    private long endTime;
    /**耗时*/
    private long cost;

    private String methodName;

    public MethodInvokeTime(long startTime, long endTime,String methodName) {
        this.startTime = startTime;
        this.endTime = endTime;
        this.cost = endTime - startTime;
        this.methodName = methodName;
    }


    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    public long getCost() {
        return cost;
    }

    public void setCost(long cost) {
        this.cost = cost;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    @Override
    public String toString() {
        return "MethodInvokeTime{" +
                "startTime=" + startTime +
                ", endTime=" + endTime +
                ", cost=" + cost +
                ", methodName=" + methodName +
                '}';
    }
}
